<%@ Page 
Language="C#" 
AutoEventWireup="true" 
CodeFile="upload.aspx.cs" 
Inherits="upload" 
Title="Upload Page" MasterPageFile="~/theme/kohout.master" 
MaintainScrollPositionOnPostback="true"
%>
<%@ MasterType TypeName="BaseMaster" %>
<%@ Register src="controls/CMS.ascx" tagname="CMS" tagprefix="cms" %>

<%--<asp:Content ID="Content1" ContentPlaceHolderID="TopContent" Runat="Server">
    <cms:CMS ID="CMS1" runat="server" />
</asp:Content>--%>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <asp:Label ID="lbl_msg" runat= "server" ForeColor="Red"/>
    <div>
        <table>
            <tr >
                <td colspan="2">
                    <asp:Label ID="lbl_upload" runat= "server" Text = "Uploading File:" Font-Bold="True"/>
                </td>
            </tr>
            <tr>
                <td><asp:Label ID="File1Path" runat= "server" Text = "Path:"/></td>
                <td><asp:FileUpload ID="FileUpload1" runat="server" Width="300px" /></td>
            </tr> 
            <tr>
                <td></td>
                <td><asp:Label ID="lbl_doc_type" runat="server" Text="Image types (.bmp .jpg .jpeg .gif .tif .tiff .png)" Width="300px" Font-Italic="True" /></td>
            </tr> 
            <tr>
                <td><asp:Label ID="File1Cat" runat= "server" Text = "Category:"/></td>
                <td><asp:DropDownList ID="DDL_File1Cat" runat="server" Width="300px" /></td>
            </tr> 
            <tr>
                <td><asp:Label ID="ChiDesc" runat= "server"/></td>
                <td><asp:TextBox ID="txt_ChiDesc" runat ="server" Width="300px" /></td>
            </tr> 
            <tr>
                <td><asp:Label ID="ChiCode" runat= "server" /></td>
                <td><asp:TextBox ID="txt_ChiCode" runat ="server" Width="300px" /></td>
            </tr> 
            <tr>
                <td><asp:Label ID="ChiSize" runat= "server" /></td>
                <td><asp:TextBox ID="txt_ChiSize" runat ="server" Width="300px" /></td>
            </tr> 
            <tr>
                <td><asp:Label ID="EngDesc" runat= "server" /></td>
                <td><asp:TextBox ID="txt_EngDesc" runat ="server" Width="300px" /></td>
            </tr>  
            <tr>
                <td><asp:Label ID="EngCode" runat= "server" /></td>
                <td><asp:TextBox ID="txt_EngCode" runat ="server" Width="300px" /></td>
            </tr> 
            <tr>
                <td><asp:Label ID="EngSize" runat= "server" /></td>
                <td><asp:TextBox ID="txt_EngSize" runat ="server" Width="300px" /></td>
            </tr>          
        </table>
        <asp:Button ID="Btn_Upload" runat="server" Text="Upload File" OnClick="Btn_Upload_Click" />
    </div>
        <br />
        <br />
        View Catagory from :
        <asp:DropDownList ID="DDL_viewcat" runat="server" Width="200px" OnSelectedIndexChanged="DDL_viewcat_SelectedIndexChanged" AutoPostBack="true" /><br />
        <asp:GridView ID="GVCat" runat="server" 
            AutoGenerateDeleteButton="True" 
            AutoGenerateEditButton="True" 
            AutoGenerateColumns="false" 
            OnRowEditing="GVCat_RowEditing" 
            OnRowCancelingEdit="GVCatRowCanceling"
            OnRowDeleting="GVCat_Rowdeleting"
            OnRowUpdating="GVCat_RowUpdating"
            OnRowCommand = "move"
            OnRowDataBound = "GVCat_Rowbind">
               <Columns>
                    <asp:TemplateField HeaderText = "LargeImage" visible="false">
                        <ItemTemplate>
                                <asp:Label ID="lbl_LargeImage" runat="server" Text='<%#Bind("LargeImage")  %>' ></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText = "ThumbnailImage" visible="false">
                        <ItemTemplate>
                                <asp:Label ID="lbl_ThumbnailImage" runat="server" Text='<%#Bind("ThumbnailImage")  %>' ></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText = "Image">
                            <ItemTemplate>
                            <asp:ImageButton ID="img_smallImage" runat="server" ImageUrl='<%#Bind("ImageURL")%>'></asp:ImageButton>
                            </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText = "<%$ Resources:Resource, DescChi %>">
                            <ItemTemplate>
                                    <asp:Label ID="lbl_Chi_desc" runat="server" Text='<%#Bind("Chi_desc")  %>' ></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>       
                                    <asp:textbox ID="txt_Chi_desc" runat="server" Text='<%#Bind("Chi_desc")  %>' ></asp:textbox>                     
                            </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText = "<%$ Resources:Resource, CodeChi %>">
                            <ItemTemplate>
                                    <asp:Label ID="lbl_Chi_code" runat="server" Text='<%#Bind("Chi_code")  %>' ></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                    <asp:textbox ID="txt_Chi_code" runat="server" Text='<%#Bind("Chi_code")  %>' ></asp:textbox>                            
                            </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText = "<%$ Resources:Resource, SizeChi %>">
                            <ItemTemplate>
                                    <asp:Label ID="lbl_Chi_size" runat="server" Text='<%#Bind("Chi_size")  %>' ></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>   
                                    <asp:textbox ID="txt_Chi_size" runat="server" Text='<%#Bind("Chi_size")  %>' ></asp:textbox>                         
                            </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText = "Product Description">
                            <ItemTemplate>
                                    <asp:Label ID="lbl_Eng_desc" runat="server" Text='<%#Bind("Eng_desc")  %>' ></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>  
                                    <asp:textbox ID="txt_Eng_desc" runat="server" Text='<%#Bind("Eng_desc")  %>' ></asp:textbox>                          
                            </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText = "Product Code">
                            <ItemTemplate>
                                    <asp:Label ID="lbl_Eng_code" runat="server" Text='<%#Bind("Eng_code")  %>' ></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>   
                                    <asp:textbox ID="txt_Eng_code" runat="server" Text='<%#Bind("Eng_code")  %>' ></asp:textbox>                         
                            </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText = "Size (W x L)">
                            <ItemTemplate>
                                    <asp:Label ID="lbl_Eng_size" runat="server" Text='<%#Bind("Eng_size")  %>' ></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>        
                                    <asp:textbox ID="txt_Eng_size" runat="server" Text='<%#Bind("Eng_size")  %>' ></asp:textbox>                    
                            </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField >
                            <ItemTemplate>
                                    <asp:Button ID="btn_up" runat="server" Text='Up' CommandName="MoveUp" Width="50px" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" ></asp:Button>
                            </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField >
                            <ItemTemplate>
                                    <asp:Button ID="btn_down" runat="server" Text='Down' CommandName="MoveDown"  Width="50px" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"></asp:Button>
                            </ItemTemplate>
                    </asp:TemplateField>
                    
               </Columns>
        </asp:GridView>
        &nbsp;
        
</asp:Content>